<%@ page contentType="text/html;charset=UTF-8"%>
<%@include file="module/common.jsp"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="description" content="cosmo云工厂">
    <meta name="Keywords" content="cosmo,cosmo云工厂">
    <title>cosmo云工厂</title>
    <link href="${ctxStatic}/cloudfactory/css/basic.css" rel="stylesheet" type="text/css" />
    <link href="${ctxStatic}/cloudfactory/css/main.css" rel="stylesheet" type="text/css" />
        <link href="${ctxStatic}/cloudfactory/css/flex.css" rel="stylesheet" type="text/css" />
    <link href="${ctxStatic}/cloudfactory/css/cloudFoundry.css" rel="stylesheet" type="text/css" />
    <!–[if lt IE9]>
    <script src="${ctxStatic}/cloudfactory/js/html5.js"></script>
    <![endif]–>
</head>

<body>
<div class="sys_warp">
    <!--header开始-->
    <jsp:include page="module/userCenterhead.jsp" flush="true" />
    
    <!--banner结束,主体开始-->
   

            <div class="background">
                <div class="titleTextBackground absolute-left-center-top-self-center">
                    <img class="titleTextBackgroundImg1" src="${ctxStatic}/cloudfactory/img/myFactory/background.png" alt="">
                    <img class="titleTextBackgroundImg2 absolute-self-center" src="${ctxStatic}/cloudfactory/img/myFactory/buliding.png" alt="">
                    <p class="titleText1 absolute-self-top-center">MY<span>&ensp;FACTORY</span></p>
                    <p class="titleText2 absolute-self-top-center">我的工厂</p>
                    <img class="titleTextLine" src="${ctxStatic}/cloudfactory/img/shoppingCart/line.png" alt="">
                    <div class="rightMenu absolute-self-center">
                        <div class="gouWuChe2">
                            <img src="${ctxStatic}/cloudfactory/img/shoppingCart/gouWuChe2.png" alt="">
                        </div>
                        <div class="customer">
                            <p>客服</p>
                        </div>
                        <div class="help">
                            <p>帮助</p>
                        </div>
                    </div>
                    <p class="titleText3 absolute-self-top-center"><a class="tc-fff" href="${ctx}/userCenter/goAndMyFactory">添加工厂 + </a></p>
                </div>

                <div class="tableAllBox">
                    <div class="myFactoryBox">
                  
					<c:forEach items="${factory }" var = "f">  
					
                    <div class="myFactoryIcon">
                            <p>${f.factoryName }</p>
                            <a href="" class="toRightImg">
                                <img src="${ctxStatic}/cloudfactory/img/myFactory/toRight.png" alt="">
                            </a>
                        </div>
                    
                    </c:forEach>
                    
                    
                    </div>
                </div>

                <div class="titleTextBackground1">
                    <img class="titleTextBackgroundImg1" src="${ctxStatic}/cloudfactory/img/shoppingCart/titleTextBackground.png" alt="">
                    <img class="titleTextBackgroundImg2 absolute-self-center" src="${ctxStatic}/cloudfactory/img/myFactory/icon.png" alt="">
                    <p class="titleText1 absolute-self-top-center">MY<span>&ensp;FACTORY</span></p>
                    <p class="titleText2 absolute-self-top-center">山东青岛生产厂</p>
                    <img class="titleTextLine" src="${ctxStatic}/cloudfactory/img/shoppingCart/line.png" alt="">

                </div>

                <div class="tableAllBox1 pb_40">
                    <div class="tableBox">
                        <div class="tableOrderBox">
                            <div class="tableproductBox">
                                <div class="borderLine1 absolute-left-center"></div>
                                <table class="tableproduct">
                                    <tr class="myFactoryTableTitle1">
                                        <td>订单编号</td>
                                        <td>功&ensp;能</td>
                                        <td>功能分类</td>
                                        <td>购买时间</td>
                                        <td>对应工厂</td>
                                        <td>状&ensp;态</td>
                                        <td>查&ensp;看</td>
                                        <td>&emsp;&emsp;</td>
                                    </tr>
                                    <tr class="blank">
                                        <td colspan="8">&emsp;&emsp;</td>
                                    </tr>
                                    <tr class="tableproductTr">
                                        <td rowspan="3" class="">QD053202</td>
                                        <td class="">仓&ensp;储</td>
                                        <td class="">
                                            <p>权限中心</p>
                                            <p>管理中心</p>
                                            <p>出入库管理</p>
                                        </td>
                                        <td class="">
                                            <p>2018年8月21日</p>
                                            <p>2018年8月21日</p>
                                            <p>2018年8月21日</p>
                                        </td>
                                        <td class="">
                                            <p>QD053202</p>
                                            <p>QD053202</p>
                                            <p>QD053202</p>
                                        </td>
                                        <td class="">
                                            <p>运行中</p>
                                            <p>运行中</p>
                                            <p>运行中</p>
                                        </td>
                                        <td class="">
                                            <p>进入应用</p>
                                            <p>进入应用</p>
                                            <p>进入应用</p>
                                        </td>
                                        <td rowspan="3" class="retract " align="center">收起&ensp;<img src="${ctxStatic}/cloudfactory/img/shoppingCart/down.png" alt=""></td>

                                    </tr>
                                    <tr>
                                        <td class="">生&ensp;产</td>
                                        <td class="">
                                            <p>权限中心</p>
                                            <p>管理中心</p>
                                            <p>出入库管理</p>
                                        </td>
                                        <td class="">
                                            <p>2018年8月21日</p>
                                            <p>2018年8月21日</p>
                                            <p>2018年8月21日</p>
                                        </td>
                                        <td class="">
                                            <p>QD053202</p>
                                            <p>QD053202</p>
                                            <p>QD053202</p>
                                        </td>
                                        <td class="">
                                            <p>运行中</p>
                                            <p>运行中</p>
                                            <p>运行中</p>
                                        </td>
                                        <td class="">
                                            <p>进入应用</p>
                                            <p>进入应用</p>
                                            <p>进入应用</p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="">设&ensp;备</td>
                                        <td class="">
                                            <p>权限中心</p>
                                            <p>管理中心</p>
                                            <p>出入库管理</p>
                                        </td>
                                        <td class="">
                                            <p>2018年8月21日</p>
                                            <p>2018年8月21日</p>
                                            <p>2018年8月21日</p>
                                        </td>
                                        <td class="">
                                            <p>QD053202</p>
                                            <p>QD053202</p>
                                            <p>QD053202</p>
                                        </td>
                                        <td class="">
                                            <p>运行中</p>
                                            <p>运行中</p>
                                            <p>运行中</p>
                                        </td>
                                        <td class="">
                                            <p>进入应用</p>
                                            <p>进入应用</p>
                                            <p>进入应用</p>
                                        </td>
                                    </tr>
                                </table>
                            </div>

                            <div class="tableproductBox none">
                                <div class="borderLine absolute-left-center"></div>
                                <table class="tableproduct">
                                    <tr class="myFactoryTableTitle1">
                                        <td>订单编号</td>
                                        <td>功&ensp;能</td>
                                        <td>功能分类</td>
                                        <td>购买时间</td>
                                        <td>对应工厂</td>
                                        <td>状&ensp;态</td>
                                        <td>查&ensp;看</td>
                                        <td>&emsp;&emsp;</td>
                                    </tr>
                                    <tr class="blank">
                                        <td colspan="8">&emsp;&emsp;</td>
                                    </tr>
                                    <tr>
                                        <td class="tableproduct1">QD053202</td>
                                        <td style="color: #999;" class="tableproduct2">——</td>
                                        <td style="color: #999;" class="tableproductNew5">——</td>
                                        <td style="color: #999;" class="tableproductNew1">——</td>
                                        <td style="color: #999;" class="tableproductNew2">——</td>

                                        <td class="tableproductNew4">运行中</td>
                                        <td style="color: #999;" class="tableproductNew3">——</td>
                                        <td class="retract tableproduct8" align="center">展开&ensp;<img style="-webkit-transform:rotateX(180deg);-ms-transform:rotateX(180deg);transform:rotateX(180deg)" src="${ctxStatic}/cloudfactory/img/shoppingCart/down.png" alt=""></td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <footer>
                    <div class="ft__top">
                        <div class="sys_width row">
                            <div class="ft__logo">
                                <a href="index.html" class="mb_30">
                                    <img src="${ctxStatic}/cloudfactory/img/logo_ft.png" alt="">
                                </a>
                                <div class="row mb_10">
                                    
                                    <p class="tc-fff">海尔云市场认证</p>
                                </div>
                                <div class="row">
                                   
                                    <p class="tc-fff">海尔安全认证</p>
                                </div>
                            </div>
                            <dl class="ft__items">
                                <dt>购买指南</dt>
                                <dd><a href="###">基本介绍</a></dd>
                                <dd><a href="###">购买应用</a></dd>
                                <dd><a href="###">合同申请</a></dd>
                                <dd><a href="###">索取发票</a></dd>
                            </dl>
                            <dl class="ft__items">
                                <dt>快速链接</dt>
                                <dd><a href="###">免费注册</a></dd>
                                <dd><a href="###">管理控制台</a></dd>
                                <dd><a href="###">用户中心</a></dd>
                                <dd><a href="###">订单管理</a></dd>
                            </dl>
                            <dl class="ft__items">
                                <dt>服务支持</dt>
                                <dd><a href="###">帮助文档</a></dd>
                                <dd><a href="###">在线客服</a></dd>
                                <dd><a href="###">建议反馈</a></dd>
                            </dl>
                            <dl class="ft__items">
                                <dt>友情链接</dt>
                                <dd><a href="###">COSMOPlat</a></dd>
                                <dd><a href="###">智能生产</a></dd>
                                <dd><a href="###">模块采购</a></dd>
                            </dl>
                            <dl class="ft__items">
                                <dt>联系我们</dt>
                                <dd><a href="###">售前邮箱</a></dd>
                                <dd><a href="###">售后邮箱</a></dd>
                                <dd><a href="###">云市场客服邮箱</a></dd>
                            </dl>
                        </div>
                    </div>
                    <div class="ft__bot">
                        <div class="sys_width tx-center tc-fff">
                            <P>
                                <a href="###">使用条款</a> |
                                <a href="###">隐私政策</a> |
                                <a href="###">关于我们</a> |
                                <span>鲁ICP备15042957号-1 Copyright © 2017 海尔集团 版权所有</span>
                            </P>
                            <P>鲁公网安备 37021202000577号</P>
                        </div>
                    </div>
                </footer>
            </div>
    <!--主体结束,footer开始-->
    <jsp:include page="module/foot.jsp" flush="true" />
    <!--footer结束-->
</div>
</body>
<script type="text/javascript" src="${ctxStatic}/cloudfactory/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="${ctxStatic}/cloudfactory/js/main.js"></script>
<script>


function submitbtn() {
	var reg = /^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9])|(18[0-9]{1}))+\d{8})$/;
	var emalReg = /^([a-zA-Z0-9]*[-_.]?[a-zA-Z0-9]+)*@([a-zA-Z0-9]*[-_]?[a-zA-Z0-9]+)+[\\.][A-Za-z]{2,3}([\\.][A-Za-z]{2})?$/;
	var name = $("#name").val();
	var psw = $("#psw").val();
	var repPsw = $("#repPsw").val();
	var phone = $("#phone").val();
	var mail = $("#mail").val();
	if(psw != repPsw) {
		$("#message").html("输入的两次密码不一致");
		$("#message").show();//显示  
		return ;
	}
	var result = emalReg.test(mail);
	if (!result) {
		$("#message").html("请输入正确的邮箱地址");
		$("#message").show();//显示  
		return ;
	}
	
	if (phone.length != 11) {
		$("#message").html("请输入有效的手机号位数");
		$("#message").show();//显示  
		return ;
	}
	var result = reg.test(phone);
	if (!result) {
		$("#message").html("请输入有效的手机号");
		$("#message").show();//显示  
		return ;
	}
	if(!$("input[type='checkbox']").is(':checked')){
		$("#message").html("请先阅读《COSMO云工厂用户协议》和隐私协议，并确认");
		$("#message").show();//显示  
		return ;
	}
	$("#message").hide();
	
	$.ajax({
		//几个参数需要注意一下
		type : "GET",//方法类型
		dataType : "json",//预期服务器返回的数据类型
		url : "${ctx}/loginCenter/saveRegister",//url
		data : {
			name:name,
			psw:psw,
			mail:mail,
			phone:phone
		},
		success : function(result) {
			debugger;
			if (result.success == "success") {
				
				alert("注册成功");

				window.location.href = "${ctx}/loginCenter/goIndex?id="+result.id;
			} else {
				$("#message").html(alert(result.success));
				$("#message").show();//显示  
				return false;
			}
		},
		error : function(result) {
			$("#message").html("注册异常");
			$("#message").show();//显示  
			return ;
		}
	});
	
	
}
    $(function(){
        indexInit();
    });
</script>
</html>